var t = getApp(),
  e = t.requirejs("core");
Page({
  data: {
    loaded: false,
    list: []
  },
  onLoad: function () {
    e.setting();
    this.setData({
      config: getApp().config
    })
  },
  onShow: function () {
    this.getList()
  },
  onPullDownRefresh: function () {
    wx.stopPullDownRefresh()
  },
  getList: function () {
    var t = this;
    e.get("user/AddressList", { uid: getApp().getCache("userinfo").uid}, function (res) {
      if(res.code==0){
        t.setData({
          loaded: true,
          list: res.info,
          show: true
        })
      }else{
        t.setData({
          loaded: true,
          show: true
        })
        //e.alert(res.msg)
      }
   
    })
  },
  select: function (s) {
    var i = e.pdata(s).index;
    t.setCache("orderAddress", this.data.list[i], 30),
      wx.navigateBack()
  }
})